//
//  VoicePlayer.h
//  RadioUrl
//
//  Created by ios on 16/4/23.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import "RadioModel.h"
@protocol VoicePlayerDelegate
@optional
-(void)sendSongProgressMessage:(CGFloat)songProgress;

@end

@interface VoicePlayer : NSObject
@property(nonatomic,strong) AVPlayer *player;
@property(nonatomic,strong) AVPlayerItem *playerItem;
@property(nonatomic,assign) NSInteger curentIndex;
@property(nonatomic,strong) RadioModel *currentRadioModel;
//@property(nonatomic,strong) NSArray *radioSoundIDs;
@property(nonatomic,assign) BOOL readToPlay;

@property(nonatomic,assign) CGFloat songProgress;

@property(nonatomic,weak) id<VoicePlayerDelegate> delegate;
@property(nonatomic,assign) BOOL isPlaying;
@property(nonatomic,strong) NSTimer *timer;
+(VoicePlayer *)shareVoicePlayer;

-(void)currentRadioPlay;

-(void)play;
-(void)playeBtnPressing;

- (void)seekPlayerToTime:(CGFloat)time;
@end
